<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no" />
    <title>个人资料</title>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../../css/style.css" />
    <link rel="stylesheet" type="text/css" href="../../css/common.css" />
    <style>
        body{
            background: #f3f3f3;
            font-size: 16px;
        }
/*        .aui-icon-left{
            padding-left:10px;
        }
        header {
            width: 100%;
            line-height: 45px;
            height: 45px;
            background: #fff;
            position: relative;
            z-index: 9;
        }
        .win_title{
            width: auto;
            text-align: center;
            position: absolute;
            right: 80px;
            left: 80px;
        }
*/
    </style>
</head>
<body>
<!-- <header class="myBorder">
    <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
    <div class="win_title">
        商品修改
    </div>
</header> -->
<header class="aui-bar aui-bar-nav aui-border-b">
    <div class="aui-pull-left aui-iconfont aui-icon-left icon-left-coler" tapmode onclick="closeWin()"></div>
    <div class="aui-title">个人资料</div>
    <div class="aui-pull-right aui-iconfont aui-icon-more icon-left-coler" tapmode onclick="showAction()" style="display: none;padding-left:15px;"></div>
</header>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/common.js"></script>
<script type="text/javascript" src="../../script/doT.min.js"></script>
<script type="text/javascript" src="../../script/jquery-1.11.3.js"></script>
<script type="text/javascript">
    var goodsId;//商品id、
    apiready = function() {
        api.parseTapmode();
        var goodsId=api.pageParam.goodsId;
        var header = $api.dom('header');
        // var footer = $api.dom('footer');
        $api.fixIos7Bar(header);

        var header_h = $api.offset(header).h;
        // var footer_h = $api.offset(footer).h;
        var body_h = $api.offset($api.dom('body')).h - header_h;
        api.openFrame({
            name : 'personInfo_frm',
            url : 'personInfo_frm.html',
            rect : {
                x : 0,
                y : header_h,
                w : 'auto',
                h : body_h
            },
            pageParam : {
                userid:api.pageParam.userid
            },
            bounces : true,
            vScrollBarEnabled : false,
            hScrollBarEnabled : false
        });
    }

    function showDelfriend(){
        $('.aui-icon-more').show();
    }

    function showAction(){
        api.actionSheet({
            // title: '底部弹出框测试',
            cancelTitle: '取消',
            destructiveTitle: '删除好友',
        }, function(ret, err) {
            var index = ret.buttonIndex;
            if(index==1){
                getStorageAll();
                var url='Friendship/unfollow?username='+user_name;
                ajaxRequest(url, 'get', {fuserid:api.pageParam.userid}, function (ret, err) {
                    if(ret.status==1){
                        api.sendEvent({
                            name:'refreshNewfriendList'
                        });
                        api.sendEvent({
                            name:'refreshContactList'
                        });
                        api.closeWin();
                    }else{
                        api.toast({
                            msg: ret.msg,
                            duration: 2000,
                            location: 'bottom'
                        });
                    }
                });
            }
        });
    }
</script>
</html>
